﻿using Creative85.Framework.Data;
using Creative85.Framework.Utilities;
using NPoco;
using Project32CHE.Biz.CustomerCar.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Project32CHE.Biz.CustomerCar
{
    public static class CarService
    {
        /// <summary>
        /// 根据车牌号获取车辆
        /// </summary>
        /// <param name="mobilephone"></param>
        /// <returns></returns>
        public static Car GetCar(Guid UnionID, Guid ShopID, string PlateNumber)
        {
            return Db.Instance.Query<Car>()
                .Where(x => x.ShopID == ShopID)
                .Where(x => x.UnionID == UnionID)
                .Where(x => x.PlateNumber == PlateNumber)
                .Where(x => x.IsDeleted == false)
                .SingleOrDefault();
        }
     
    }
}
